import http from '@/utils/http'

/**
 * 添加教师信息
 */
export const addTeacherApi = async(param) => {
  return http.post('/api/teacher', param)
}

/**
 * 修改教师信息
 */
export const editTeacherApi = async(param) => {
  return http.put('/api/teacher', param)
}

/**
 * 根据id删除教师信息
 */
export const deleteTeacherApi = async(param) => {
  return http.delete('/api/teacher', param)
}

/**
 * 查询教师信息
 */
export const getTeacherListApi = async(param) => {
  return http.get('/api/teacher/list', param)
}

/**
 * 查询所有教师信息
 */
export const getAssignTeacherListApi = async() => {
  return http.get('/api/teacher/getList', null)
}

/**
 * 查询角色信息
 */
export const getRoleApi = async() => {
  return http.get('/api/teacher/getRoles', null)
}

/**
 * 根据教师id查询对应角色
 */
export const getRoleByIdApi = async(param) => {
  return http.get('/api/teacher/getRoleById', param)
}

/**
 * 获取教师班级课程信息
 */
export const getTeacherClassCourseListApi = async(param) => {
  return http.get('/api/teacher/getTeacherClassCourseList', param)
}

/**
 * 导入班级学生成绩
 */
export const importStuInfoApi = async(param) => {
  return http.upload('/api/teacher/importStuInfo', param)
}

/**
 * 重置密码 API
 *
 * @param param 重置密码参数
 * @returns 发起 POST 请求到 '/api/teacher/resetPasswordApi' 的结果
 */
export const resetPasswordApi = async(param) => {
  return http.post('/api/teacher/resetPassword', param)
}

